<?php
class Controller_Admin_Log extends Controller_Template
{
    public function __construct($req, $res)
    {
        $this->template = 'smarty:blank';
        parent::__construct($req, $res);
    }

    public function action_list ($day1 = NULL, $day2 = NULL)
    {
        if (empty($day1))
            $day1 = date("Y-m-d");

        if (empty($day2))
            $day2 = $day1;

        $logs = Union_Log::read($day1, $day2);

        $this->template->set_filename('smarty:log/list');
        $this->template->set('logs', $logs);
    }
}
